<?php 


include 'includes/connection.php';

header("Content-type: text/xml");

echo '<?xml version="1.0" encoding="UTF-8" ?>';

?>

<urlset xmlns="http://www.google.com/schemas/sitemap/0.84" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">

    <url>
        <loc>http://designdeluge.com/</loc>
        <lastmod>2010-04-20</lastmod>
        <changefreq>weekly</changefreq>
        <priority>1.00</priority>
    </url>

    <url>
        <loc>http://designdeluge.com/about.php</loc>
        <lastmod>2010-04-20</lastmod>
        <changefreq>never</changefreq>
        <priority>0.5</priority>
    </url>

    <?php

    $entries = mysql_query("SELECT * FROM Entries");

    while($row = mysql_fetch_assoc($entries)) {
    $title = stripslashes($row['title']);
    $date = date("Y-m-d", strtotime($row['timestamp']));

    echo "

    <url>
        <loc>http://designdeluge.com/".$title."</loc>
        <lastmod>".$date."</lastmod>
        <changefreq>never</changefreq>
        <priority>0.8</priority>
    </url>";

 } ?>

</urlset>